//
//  orderButten.m
//  代理端
//
//  Created by mac on 16/3/2.
//  Copyright © 2016年 sliver. All rights reserved.
//

#import "orderButten.h"
@interface orderButten()

@property(nonatomic,strong)UILabel *lable;
@end

@implementation orderButten

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
        [self setTitle:@"请选择型号" forState:UIControlStateNormal];
        [self setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
        self.backgroundColor=[UIColor whiteColor];
        self.titleLabel.textColor = [UIColor grayColor];
//        [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        
        self.titleLabel.font = [UIFont systemFontOfSize:17];
        self.layer.masksToBounds = YES;
        
        
        self.lable =[[UILabel alloc]init];
        self.lable.textAlignment = NSTextAlignmentRight;
//        self.lable.text= @"$23";
        [self addSubview:self.lable];
        
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.contentEdgeInsets = UIEdgeInsetsMake(0,10*KScr, 0, 0);
    self.layer.cornerRadius = 5*KScr;

    
    self.lable.frame = CGRectMake(self.frame.size.width/2, 0, self.frame.size.width/2-20*KScr, self.frame.size.height);

}
-(void)gaveMprice:(NSString *)str
{

    self.lable.text = str;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
